﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace Sotipha.Web.Master
{
    public partial class Web : System.Web.UI.MasterPage
    {
        public string KeywordSearch ="Keyword Search";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["lang"] == null)
                Session["lang"] = "en";
            if (Request.QueryString["lang"] != null)
                Session["lang"] = Request.QueryString["lang"];
            string btnClose = "Close";
            if (Session["lang"].ToString() == "vi")
            {
                ltrCheckOut.Text = "Thanh Toán";
                ltrShoppingBag.Text = "Giỏ Hàng";
               this.KeywordSearch = "Từ Khóa Tìm kiếm";
               btnClose = "Đóng";
               HtmlLink css = new HtmlLink();
               css.Href = "~/Css/Core/CBaseVN.css";
               css.Attributes["rel"] = "stylesheet";
               css.Attributes["type"] = "text/css";
               css.Attributes["media"] = "all";
               Page.Header.Controls.Add(css);
            }
            string script = string.Format("var ServerData={{btnClose:'{0}'}};\n", btnClose);
            Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "Project_JS", script, true);
        }
    }
}